package com.zenithmind.note.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.zenithmind.common.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;

/**
 * 笔记实体类
 */
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@Schema(name = "笔记实体", description = "笔记实体")
public class Note extends BaseEntity {
    
    @Schema(description = "用户ID")
    private String userId;
    
    @Schema(description = "课程ID")
    private String courseId;
    
    @Schema(description = "分类ID")
    private String categoryId;
    
    @NotBlank(message = "笔记标题不能为空")
    @Size(max = 100, message = "笔记标题长度不能超过100个字符")
    @Schema(description = "笔记标题")
    private String title;
    
    @Schema(description = "笔记内容")
    @TableField("content")
    private String content;
    
    @Schema(description = "笔记标签")
    @Size(max = 255, message = "笔记标签长度不能超过255个字符")
    private String tags;
    
    @Schema(description = "状态(0-草稿, 1-已发布)")
    private Integer status; // 0: 草稿, 1: 已发布
    
    @Schema(description = "浏览次数")
    private Integer viewCount;
    
    @Schema(description = "点赞次数")
    private Integer likeCount;
    
    @Schema(description = "评论次数")
    private Integer commentCount;
    
} 